package com.gm.wholesale.module.settlement.api;

import android.util.ArrayMap;

import com.gm.commonlib.base.baseBean.BaseListResp;
import com.gm.commonlib.base.baseBean.BasePageData;
import com.gm.commonlib.base.baseBean.BasePageListData;
import com.gm.commonlib.base.baseBean.BaseResp;
import com.gm.wholesale.module.settlement.bean.CustomerSettlementBean;
import com.gm.wholesale.module.settlement.bean.CustomerSettlementDetail;
import com.gm.wholesale.module.settlement.bean.WaitToAccuntBean;
import com.gm.wholesale.module.settlement.bean.custorm.CustormReviceBean;

import java.util.HashMap;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;

public interface IReconciliationApi {
    @GET("pda/api/v1/settlement/customer/total")
    Observable<BasePageData<CustormReviceBean>> getCustormReviceMoney(@QueryMap ArrayMap<String,Object> quryData);

    //获取待对账列表接口  todo 列表和详情都使用的一个接口，有点不符合常规，讲究使用吧
    @GET("pda/api/v1/settlement/customer/detail")
    Observable<BasePageData<WaitToAccuntBean>> getWaitToAccunts(@QueryMap ArrayMap<String,Object> quryData);

    //应收账款 获取未支付 待结算 已完成
    @GET("pda/api/v1/settlement/customer")
    Observable<BasePageData<CustomerSettlementBean>> getCustomerSettlementList(@QueryMap ArrayMap<String,Object> quryData);

    //创建对账单
    @POST("pda/api/v1/settlement/customer")
    Observable<BaseResp> createAccount(@Body HashMap<String,Object> data);


    //支付对账单
    @PUT("pda/api/v1/settlement/customer/{id}")
    Observable<BaseResp> payOrder(@Path ("id") long id,@Body HashMap<String,Object> data);


    //修改对账单名字
    @PUT("pda/api/v1/settlement/customer/edit/{id}")
    Observable<BaseResp> updateOrderName(@Path ("id") long id,@Body HashMap<String,Object> data);



    //应收账款 获取未支付 待结算 已完成
    @GET("pda/api/v1/settlement/customer")
    Observable<BasePageData<CustomerSettlementDetail>> getCustomerSettlementDetail(@QueryMap ArrayMap<String,Object> quryData);


    //取消对账单
    @DELETE("pda/api/v1/settlement/customer/{id}")
    Observable<BaseResp> cancelSettlement(@Path("id") long id);


}
